﻿// My methods here.
//-----------------------------------------------------------------------
// <Copyright file=Web company=DHPD>
// Copyright (c) DHPD Corporation (http://dhpd.edu.vn). All rights reserved.
// </copyright>
// <author>HP</author>
//-----------------------------------------------------------------------


using System;
using System.Collections.Generic;
using KM.DAT;
using KM.ENT;
using KM.Models;

namespace KM.BUS
{
    /// <summary>
    /// This is busWeb class
    /// </summary>

    public class busWeb
    {

        public busWeb()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public void createEdit(entWeb entW)
        {
            datWeb datW = new datWeb();
            datW.createEdit(entW);
        }
        public List<entWeb> getAll(ref PagingInfoModel page)
        {
            datWeb datW = new datWeb();
            List<entWeb> lst = new List<entWeb>();
            lst = datW.getAll(ref page);
            return lst;
        }
        public List<entWeb> getByIdParent(int Id)
        {
            datWeb datW = new datWeb();
            List<entWeb> lst = new List<entWeb>();
            lst = datW.getByIdParent(Id);
            return lst;
        }
        public List<entWeb> getAllByForeignKey(int Id, ref PagingInfoModel page)
        {
            datWeb datW = new datWeb();
            List<entWeb> lst = new List<entWeb>();
            lst = datW.getAllByForeignKey(Id, ref page);
            return lst;
        }
        public entWeb getInfo(int Id)
        {
            datWeb datW = new datWeb();
            entWeb entW = new entWeb();
            entW = datW.getInfo(Id);
            return entW;
        }
        public bool delete(int Id)
        {
            datWeb datW = new datWeb();
            datW.delete(Id);
            return true;
        }
        public List<entWeb> getAllWebChild()
        {
            return new datWeb().getAllWebChild();
        }
    }
}
